package powtorka.kolekcje.bis;

public class Song implements Comparable<Song> {
	
	private String title;
	private String artist;
	private String rating;
	private String bpm;
	
	public Song(String title, String artist, String rating, String bpm){
		this.title = title;
		this.artist = artist;
		this.rating = rating;
		this.bpm = bpm;
	}
	
	@Override
	public int compareTo(Song song){
		return this.title.compareTo(song.getTitle());
	}
	
	@Override
	public int hashCode(){
		return this.title.hashCode();
	}
	
	@Override
	public boolean equals(Object o){
		Song song = (Song) o;
		return song.getTitle().equals(this.title);
	}
	
	@Override
	public String toString(){
		return this.artist + ", " + this.title + ", " + this.rating + ", " + this.bpm;
	}

	public String getTitle() {
		return title;
	}

	public String getArtist() {
		return artist;
	}

	public String getRating() {
		return rating;
	}

	public String getBpm() {
		return bpm;
	}

}
